package com.yanqu.road.entity.union.cross;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_cross_union_reward")
public class CrossUnionReward extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "奖励ID")
    private long recordId;

    @FieldTypeAnnotation(desc = "玩家ID")
    private long userId;

    @FieldTypeAnnotation(update = true, desc = "商帮")
    private String unionUid = "";

    @FieldTypeAnnotation(desc = "奖励")
    private String reward;

    @FieldTypeAnnotation(desc = "0：失去；1：获得")
    private int type;

    @FieldTypeAnnotation(desc = "同步标识（0：未同步；1：已同步")
    private int sync;

    @FieldTypeAnnotation(desc = "添加时间")
    private int addTime;

    @FieldTypeAnnotation(desc = "同步时间")
    private int syncTime;

    @FieldTypeAnnotation(desc = "原因")
    private int son;

    public long getRecordId() {
        return recordId;
    }

    public void setRecordId(long recordId) {
        if(this.recordId != recordId) {
            this.recordId = recordId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if(!Objects.equals(this.reward, reward)) {
            this.reward = reward;
            setUpdateOption();
        }
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        if(this.type != type) {
            this.type = type;
            setUpdateOption();
        }
    }

    public int getSync() {
        return sync;
    }

    public void setSync(int sync) {
        if(this.sync != sync) {
            this.sync = sync;
            setUpdateOption();
        }
    }

    public int getAddTime() {
        return addTime;
    }

    public void setAddTime(int addTime) {
        if(this.addTime != addTime) {
            this.addTime = addTime;
            setUpdateOption();
        }
    }

    public int getSyncTime() {
        return syncTime;
    }

    public void setSyncTime(int syncTime) {
        if(this.syncTime != syncTime) {
            this.syncTime = syncTime;
            setUpdateOption();
        }
    }

    public int getSon() {
        return son;
    }

    public void setSon(int son) {
        if(this.son != son) {
            this.son = son;
            setUpdateOption();
        }
    }
}
